Fixed wing Auto Speed Mode#11595
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Test firmware build ready — commit Download firmware for PR #11595 237 targets built. Find your board's
|
|
@breadoven Firstly I want to start by saying how much we all appreciate your work here on INAV. ❤️ When I setup the fixedwing auto speed mode with the IPF. I also tried a simplified version as you have here. But found it was just too lacking in many area's of safety of operation, and efficiency. Example:
I no this was long winded. And I'm not trying to make more work for you. But I thought it might be helpful for you to know what I also tried. So the feature can be made safer and more user friendly. |
|
@Jetrell I probably should have said this is a work in progress. The initial build was just for basic testing in light wind but obviously is limited otherwise. I've made some changes in the latest commits: Added pitot Added stall protection when using ground speed Added low ground speed protection Added a Things that need further work:
I'm not sure what you mean here. The normal OSD throttle display shows the Auto Speed throttle setting the same as any other auto throttle mode. The only OSD element that's been added for this PR displays the selected speed, |
I totally agree. The wind can swing in as little as a couple of hundred meters. So 15mins seems extreme. I figured it was just set this high, so virtual wind/airspeed wouldn't become invalid and cause issues with something that was relying on it.
Max throttle is more beneficial for power efficiency. But limiting Min throttle to a value higher than zero. Has two benefits that I found.
Sorry, I could have worded that better. |
There is filtering on the throttle output that damps the rate of change so maybe it's not an issue in this case.
This PR honours motor stop where applicable, Acro, Manual etc, but it could be changed to prevent that and have Idle as the minimum allowed always. I left motor stop behaviour as is to avoid surprises, e.g. in Manual, although that could be fixed by only allowing activation when in flight.
This shows the Auto throttle OSD display whenever Auto Speed is active, so it also works for non Nav modes. |
I think that would be a good way to go about it. EDIT: |
Adds Auto Speed mode for fixed wing similar to #10928.
Operation is pretty simple. It is enabled as an aux mode so can be activated in the usual way. Minimum and maximum allowed speeds are set using 2 settings with a range of 5 to 50 m/s, defaults of 11m/s and 22m/s respectively.. The desired speed is set between these limits using the throttle stick which acts as a speed controller only. An OSD element has been added which displays the current set speed, this is only visible when Auto speed mode is active. Speeds are either Pitot or 3D GPS based (so a valid velocity estimated is required) defaulting to Pitot if installed.
Throttle is automatically controlled using PID control with P, I and D inputs with filtering to damp out rapid throttle changes. In Nav modes the normal fixed wing pitch2throttle control is bypassed when using a Pitot. Minimum ground speed throttle override is still active for Pitot and ground speed based control.
There is no maximum throttle limit set at the moment. Minimum throttle is dynamically limited in ground speed mode based on cruise throttle + pitch2throttle settings, but Pitot speed mode is always limited to Idle only. However, motor stop is still active so throttle low will cause the motors to stop as usual, e.g. in Acro, Manual, Nav modes where allowed etc.
The mode can be activated in all cases except during during Failsafe and Emergency Landing and certain phases of Nav modes where it's not required. So it can be used in Manual and Acro as well as navigation modes.
Currently there is no way to rapidly shut off the mode other than via the aux activation. This may need to be looked further if it's considered a problem together with other changes to improve functionality such as dealing with strong head winds etc.
HITL tested only at the moment where it works well with the default PID tune. Throttle control is smooth and responsive.
Configurator support iNavFlight/inav-configurator#2641.